<%@page import="java.util.LinkedList"%>
<%@page import="java.util.ArrayList"%>
<%@page import="java.util.List"%>
<%@page import="java.util.Calendar"%>
<%@page import="java.text.SimpleDateFormat"%>
<%@page import="GetData.DataWS"%>
<%@page import="dktc_ws.Phieudangky" %>
<%@page import="dktc_ws.Sinhvien" %>
<%@page import="dktc_ws.Lophoc" %>

<%@page contentType="text/html" pageEncoding="UTF-8"%>

<% request.setCharacterEncoding("UTF-8");
    response.setCharacterEncoding("UTF-8");
    response.setContentType("text/html; charset=UTF-8"); 
    
    int malop = Integer.parseInt(request.getParameter("id"));
    
    DataWS ws = new DataWS();
    List<Integer> dspdk = ws.laydsmapdktheolophoc(malop);
    
    Lophoc lop = ws.laydanhsachlophoc(malop).get(0);
 %>
            

<h2>Danh sách sinh viên đăng ký lớp </h2>  

<table id="rounded-corner" summary="">
    <thead>
    <tr>
            <th scope="col" class="rounded-company">  </th>
            <th scope="col" class="rounded">Mã sinh viên</th>
            <th scope="col" class="rounded">Họ tên</th>
            <th scope="col" class="rounded">Giới tính</th>
            <th scope="col" class="rounded-q4">Ghi chú</th>
        </tr>
    </thead>       
    <tbody> 
        <%
        Phieudangky pdk;
        Sinhvien sv;
for(int i=0;i<dspdk.size();i++)
       {
pdk = ws.laydanhsachphieudangky(dspdk.get(i)).get(0);
sv = ws.laymotsinhvien(pdk.getMasv());
%>
        <tr>
            <td><%=i+1%></td>
            <td><%=sv.getMasv()%></td> 
            <td><%=sv.getHoten()%></td> 
            <td><%=sv.getGioitinh()==1?"Nam":"Nữ"%></td> 
            <td></td>
        </tr>      
    	      
        <%}

%>         
    </tbody>
</table>